<template>
	<view class="content">
		<view class="top-lunbot">

		</view>
		<view class="btn-content">
			<view class="btn btn1" @click="gotoRegpatyIndex()">
				创建队伍
			</view>
			<view class="btn btn2" @click="gotoMePatyViews()">
				我的组队
			</view>
			<view class="btn btn3" @click="gotoInputPaty()">
				加入队伍
			</view>
			<view class="btn btn4" @click="gotoHistory()">
				组队记录
			</view>

		</view>
	</view>
</template>
<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		ref
	} from 'vue';

	const openId = ref('')

	// 跳转加入队伍
	const gotoInputPaty = () => {
		uni.navigateTo({
			url: '/pages/mine/zuiduiviews/jiaruview'
		})
	}
	// 跳转到创建组队
	const gotoRegpatyIndex = () => {
		uni.navigateTo({
			url: '/pages/mine/zuiduiviews/chuangjianPatyViews'
		})
	}
	// 跳转到我的组队
	const gotoMePatyViews = () => {
		uni.navigateTo({
			url: '/pages/mine/zuiduiviews/wodeView'
		})
	}
	// 跳转到历史组队
	const gotoHistory = () => {
		uni.navigateTo({
			url:`/pages/mine/zuiduiviews/zudui_history_view`
		})
	}

	onLoad(() => {
		uni.getStorage({
			key: 'openid',
			success: function(res) {
				openId.value = res.data.openid
			}
		})
	})
</script>
<style lang="scss" scoped>
	.content {
		.top-lunbot {
			width: 100vw;
			height: 400rpx;
			background-color: lightskyblue;
		}

		.btn-content {
			padding: 20rpx;
			margin: 20rpx;
			border-radius: 10rpx;
			border: 1rpx solid gainsboro;
			display: grid;
			grid-template-columns: repeat(2, 1fr);
			grid-template-rows: repeat(2, 1fr);
			.btn {
				padding: 30rpx;
				text-align: center;
			}
			.btn1 {
				border-right: 1px solid gainsboro;
				border-bottom: 1px solid gainsboro;
			}
			.btn2 {
				border-bottom: 1px solid gainsboro;
			}
			.btn3 {
				border-right: 1px solid gainsboro;
			}
		}
	}
</style>